from ..models import Model


class AccountChartTemplate(Model):
    _name = "account.chart.template"


class AccountMoveLine(Model):
    _name = "account.move.line"

    _metadata = {
        "context": {
            "default_type": "entry",
            "view_no_maturity": True,
            "default_partner_id": False,
            "default_currency_id": False

        },

        "field_onchange22": {
            "asset_category_id": "1",
            "account_id": "1",
            "partner_id": "",
            "name": "",
            "analytic_account_id": "1",
            "analytic_tag_ids": "1",
            "date_maturity": "",
            "amount_currency": "1",
            "currency_id": "1",
            "tax_ids": "1",
            "debit": "1",
            "credit": "1",
            "country_id": "",
            "tag_ids": "1",
            "payment_id": "1",
            "product_id": "1",
            "quantity": "1",
            "product_uom_id": "",
            "price_unit": "1",
            "discount": "1",
            "price_subtotal": "1",
            "price_total": "",
            "sequence": "",
            "move_name": "",
            "date": "",
            "tax_line_id": "1",
            "tax_group_id": "",
            "tax_repartition_line_id": "1",
            "tax_base_amount": "1",
            "tax_exigible": "",
            "company_id": "1",
            "purchase_line_id": "",
            "company_currency_id": "",
            "recompute_tax_line": "",
            "display_type": "",
            "is_rounding_line": "",
            "exclude_from_invoice_tab": "1",
            "account_internal_type": ""

        }
    }

    def test(self):
        fg = self.get_options({'account_id': None})
        print(fg)

        for k, v in fg.items():
            print(k, ',', v)
        pass


class AccountMove(Model):
    _name = "account.move"

    _metadata = {
        "context": {
            "default_type": "entry",
            "view_no_maturity": True
        },

        "field_onchange": {
            "id": "",
            "type": "1",
            "state": "1",
            "name": "1",
            "partner_id": "1",
            "partner_shipping_id": "1",
            "ref": "",
            "date": "1",
            "company_currency_id": "",
            "commercial_partner_id": "1",
            "bank_partner_id": "",
            "journal_id": "1",
            "company_id": "1",
            "currency_id": "1",

            "purchase_id": "1",
            "purchase_vendor_bill_id": "1",

            "authorized_transaction_ids": "",
            "tax_lock_date_message": "",

            "has_reconciled_entries": "",
            "restrict_mode_hash_table": "",

            "amount_untaxed": "",
            "amount_by_group": "",
            "amount_total": "",
            "amount_residual": "",
            "narration": "",

            "team_id": "",
            "fiscal_position_id": "",

            # "invoice_payments_widget": "",
            # "invoice_outstanding_credits_debits_widget": "",
            # "invoice_payment_state": "",
            # "invoice_filter_type_domain": "",
            # "invoice_has_outstanding": "",
            # "invoice_sent": "",
            # "invoice_sequence_number_next_prefix": "",
            # "invoice_sequence_number_next": "",
            # "invoice_has_matching_suspense_amount": "",
            # "invoice_vendor_bill_id": "1",
            # "invoice_date": "1",
            # "invoice_payment_term_id": "1",
            # "invoice_date_due": "1",
            # "invoice_line_ids": "1",
            # "invoice_line_ids.sequence": "",
            # "invoice_line_ids.move_name": "",
            # "invoice_line_ids.product_id": "1",
            # "invoice_line_ids.name": "",
            # "invoice_line_ids.asset_category_id": "1",
            # "invoice_line_ids.account_id": "1",
            # "invoice_line_ids.analytic_account_id": "1",
            # "invoice_line_ids.analytic_tag_ids": "1",
            # "invoice_line_ids.quantity": "1",
            # "invoice_line_ids.product_uom_id": "",
            # "invoice_line_ids.price_unit": "1",
            # "invoice_line_ids.discount": "1",
            # "invoice_line_ids.tax_ids": "1",
            # "invoice_line_ids.price_subtotal": "1",
            # "invoice_line_ids.price_total": "",
            # "invoice_line_ids.partner_id": "",
            # "invoice_line_ids.amount_currency": "1",
            # "invoice_line_ids.currency_id": "1",
            # "invoice_line_ids.debit": "1",
            # "invoice_line_ids.credit": "1",
            # "invoice_line_ids.date": "",
            # "invoice_line_ids.date_maturity": "",
            # "invoice_line_ids.tax_line_id": "1",
            # "invoice_line_ids.tax_repartition_line_id": "1",
            # "invoice_line_ids.tag_ids": "1",
            # "invoice_line_ids.tax_base_amount": "1",
            # "invoice_line_ids.tax_exigible": "",
            # "invoice_line_ids.company_id": "1",
            # "invoice_line_ids.purchase_line_id": "",
            # "invoice_line_ids.company_currency_id": "",
            # "invoice_line_ids.recompute_tax_line": "",
            # "invoice_line_ids.display_type": "",
            # "invoice_line_ids.is_rounding_line": "",
            # "invoice_line_ids.exclude_from_invoice_tab": "1",
            # "invoice_line_ids.account_internal_type": "",
            # "invoice_line_ids.always_set_currency_id": "",
            # "invoice_line_ids.parent_state": "",
            # "invoice_user_id": "1",
            # "invoice_origin": "",
            # "invoice_incoterm_id": "",
            # "invoice_cash_rounding_id": "1",
            # "invoice_source_email": "",
            # "invoice_payment_ref": "1",
            # "invoice_partner_bank_id": "",


            # "line_ids": "1",
            # "line_ids.asset_category_id": "1",
            # "line_ids.account_id": "1",
            # "line_ids.partner_id": "",
            # "line_ids.name": "",
            # "line_ids.analytic_account_id": "1",
            # "line_ids.analytic_tag_ids": "1",
            # "line_ids.date_maturity": "",
            # "line_ids.amount_currency": "1",
            # "line_ids.currency_id": "1",
            # "line_ids.tax_ids": "1",
            # "line_ids.debit": "1",
            # "line_ids.credit": "1",
            # "line_ids.country_id": "",
            # "line_ids.tag_ids": "1",
            # "line_ids.payment_id": "1",
            # "line_ids.product_id": "1",
            # "line_ids.quantity": "1",
            # "line_ids.product_uom_id": "",
            # "line_ids.price_unit": "1",
            # "line_ids.discount": "1",
            # "line_ids.price_subtotal": "1",
            # "line_ids.price_total": "",
            # "line_ids.sequence": "",
            # "line_ids.move_name": "",
            # "line_ids.date": "",
            # "line_ids.tax_line_id": "1",
            # "line_ids.tax_group_id": "",
            # "line_ids.tax_repartition_line_id": "1",
            # "line_ids.tax_base_amount": "1",
            # "line_ids.tax_exigible": "",
            # "line_ids.company_id": "1",
            # "line_ids.purchase_line_id": "",
            # "line_ids.company_currency_id": "",
            # "line_ids.recompute_tax_line": "",
            # "line_ids.display_type": "",
            # "line_ids.is_rounding_line": "",
            # "line_ids.exclude_from_invoice_tab": "1",
            # "line_ids.account_internal_type": "",

            # "campaign_id": "",
            # "medium_id": "",
            # "source_id": "",
            # "auto_post": "",
            # "reversed_entry_id": "",
            # "to_check": "",
            # "message_follower_ids": "",
            # "activity_ids": "",
            # "message_ids": "",
            # "message_attachment_count": ""

        }
    }
